package fei.zhou.lambdalearn.demo3;

/**
 * 描述该类- JPA
 *
 * @author zhoufei
 * @class: Toshow
 * @date 2020/12/22 20:49
 * @Verson 1.0 -2020/12/22 20:49
 * @see
 */
public class Demo1 {
    
    public static void main(String[] args) {
        method((String s) -> {
            System.out.println(s);
        });
        System.out.println("-----方法引用取代Lambda----");
        method(System.out::println);
        
    }
    
    public static void method(Toshow toshow) {
        toshow.toSee("小明");
    }
    
    interface Toshow {
        void toSee(String userName);
    }
}